<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<script type="text/javascript" src="../js/ajax/ajax.patientManager.js"></script>
<!-- <script type="text/javascript" src="../js/plug-in/jquery.json-2.3.js"></script> -->
<!-- <script type="text/javascript" src="../js/plug-in/jquery.fixheadertable.js"></script> -->
<div id="main">
  <h2>Patient manager</h2>
  <div style="display: inline-block; width: 100%;">
    <div id="result">
      <html:messages id="message" message="true">
        <bean:write name="message" />
      </html:messages>
    </div>
    <div style="float: left;">
      <html:form action="/Officer/patientaction.do?act=create" styleId="patientCreateFrm">
        <table>
          <tr>
            <td>First name</td>
            <td><html:text property="firstName"></html:text></td>
          </tr>
          <tr>
            <td>Last name</td>
            <td><html:text property="lastName"></html:text></td>
          </tr>
          <tr>
            <td>Emegency contact</td>
            <td><html:textarea property="emgContact"></html:textarea></td>
          </tr>
          <tr>
            <td>Address</td>
            <td><html:textarea property="address"></html:textarea></td>
          </tr>
          <tr>
            <td>Appointment day</td>
            <td><html:text styleId="datepicker" property="appointmentDay" style="width: 100px"></html:text> <html:select
                property="appointmentTime">
                <html:option value="07:00">07:00</html:option>
                <html:option value="08:30">08:30</html:option>
                <html:option value="10:00">10:00</html:option>
                <html:option value="13:30">13:30</html:option>
                <html:option value="14:30">14:30</html:option>
                <html:option value="15:30">15:30</html:option>
              </html:select></td>
          </tr>
          <tr>
            <td></td>
            <td><html:submit value="Create"></html:submit></td>
          </tr>
        </table>
      </html:form>
      <html:form action="/Officer/patientaction.do?act=edit" styleId="patientEditFrm">
        <table>
          <tr>
            <td>Patient Id</td>
            <td><html:hidden property="idPatientDetail" styleId="idPatientDetail"></html:hidden> <input type="text"
              disabled="disabled" id="idPatient"></td>
          </tr>
          <tr>
            <td>First name</td>
            <td><html:text property="firstName" styleId="firstName"></html:text></td>
          </tr>
          <tr>
            <td>Last name</td>
            <td><html:text property="lastName" styleId="lastName"></html:text></td>
          </tr>
          <tr>
            <td>Emegency contact</td>
            <td><html:textarea property="emgContact" styleId="emgContact"></html:textarea></td>
          </tr>
          <tr>
            <td>Address</td>
            <td><html:textarea property="address" styleId="address"></html:textarea></td>
          </tr>
          <tr>
            <td></td>
            <td><html:submit value="Edit"></html:submit> <input type="button" value="Cancel"
              onclick="showCreateForm(1)"></td>
          </tr>
        </table>
      </html:form>
    </div>
    <div style="float: left; margin-top: 28px; margin-right: 20px">
      <table class="jtable" id="jtable">
        <thead>
          <tr>
            <th>Id</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Emg contact</th>
            <th>Address</th>
            <th>User id</th>
            <th></th>
          </tr>
        </thead>
        <tbody id="listPa">
        </tbody>
      </table>
      <div class="loading"></div>
    </div>
  </div>
  <div id="dialog-confirm" title="Empty the recycle bin?">
    <p>
      <span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>These items will be
      permanently deleted and cannot be recovered. Are you sure?
    </p>
  </div>
</div>
